Display Values from a Database (Bind Report Elements to Data)
Report controls can either display static information or dynamic data fetched from the bound IntelliTrack database.
Data-bound controls are indicated by a yellow database icon in their top-right corner, both in the design panel and report explorer.
To embed dynamic information to a report, if this information is contained in the report's data source, this can easily be done using one of the following approaches.
- Using the field list.
- Using the smart tag.
- Using the property grid.
After a control is bound to data, you may wish to employ additional features, which are listed in the final section of this document:
- special capabilities.
Using the Field List
- To bind an existing report control to a data field, click the required field item in the Field List, and then drag and drop it onto the control. The yellow database icon inside it will indicate that it's been successfully bound.
- To add a new data-bound control, simply drag the required data field from the Field List onto a report band. This will create a Label bound to this data field.
- A more flexible way to create data-bound elements is to right-click a Field List item, and then drag and drop it onto a report. This will invoke the context menu, where you can choose which control should represent your data, and it will be automatically created and bound to the selected data field.
Using the Smart Tag
Click a control's smart tag, and in the invoked actions list, expand the data binding drop-down list, and select the required data field.
Using the Property Grid
Click a control to select it, and in the property grid, expand the (Data Bindings) branch that hold the bindable options. Specify a data field for the required attribute (e.g., Text).
Special Capabilities
After a control is bound, you can apply formatting to its dynamic content (e.g., for it to be treated a currency, or date-time content).
It is possible to make a control display a result of a summary function calculated across the data field to which it is bound.
Another noteworthy option is to combine both static and dynamic content within the same control (e.g., to append some text prefix or postfix to a value obtained from a database), or even bind a control to multiple data fields at one time.
If it's required to perform some pre-calculations over the data field to which a control is bound, this can be done by creating a calculated field, and binding the control to it.
In turn, a calculated field may contain both dynamic and static parameters, which can be requested each time a report is being previewed.